﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PcapDotNet.Core;

namespace MolyMade.Mute
{
    public static class Devices
    {


        public static List<NetworkDevice> GetDevices()
        {
            var allDevices = LivePacketDevice.AllLocalMachine;
            if (allDevices.Count == 0)
            {
                throw new Exception("No interface found.Check WinPcap or your hardware!");
            }
            return allDevices.Select(i => new NetworkDevice(i)).ToList();
        }

    }
}
